Optimal. Leaf size=99 \[ \frac {2 (a+b x) (A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{\sqrt {a} b^{3/2} \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {2 B \sqrt {x} (a+b x)}{b \sqrt {a^2+2 a b x+b^2 x^2}} \]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {770, 80, 63, 205} \begin {gather*} \frac {2 (a+b x) (A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{\sqrt {a} b^{3/2} \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {2 B \sqrt {x} (a+b x)}{b \sqrt {a^2+2 a b x+b^2 x^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 63
Rule 80
Rule 205
Rule 770
Rubi steps
\begin {align*} \int \frac {A+B x}{\sqrt {x} \sqrt {a^2+2 a b x+b^2 x^2}} \, dx &=\frac {\left (a b+b^2 x\right ) \int \frac {A+B x}{\sqrt {x} \left (a b+b^2 x\right )} \, dx}{\sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {2 B \sqrt {x} (a+b x)}{b \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {\left (2 \left (\frac {A b^2}{2}-\frac {a b B}{2}\right ) \left (a b+b^2 x\right )\right ) \int \frac {1}{\sqrt {x} \left (a b+b^2 x\right )} \, dx}{b^2 \sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {2 B \sqrt {x} (a+b x)}{b \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {\left (4 \left (\frac {A b^2}{2}-\frac {a b B}{2}\right ) \left (a b+b^2 x\right )\right ) \operatorname {Subst}\left (\int \frac {1}{a b+b^2 x^2} \, dx,x,\sqrt {x}\right )}{b^2 \sqrt {a^2+2 a b x+b^2 x^2}}\\ &=\frac {2 B \sqrt {x} (a+b x)}{b \sqrt {a^2+2 a b x+b^2 x^2}}+\frac {2 (A b-a B) (a+b x) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{\sqrt {a} b^{3/2} \sqrt {a^2+2 a b x+b^2 x^2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 72, normalized size = 0.73 \begin {gather*} \frac {2 (a+b x) \left ((A b-a B) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )+\sqrt {a} \sqrt {b} B \sqrt {x}\right )}{\sqrt {a} b^{3/2} \sqrt {(a+b x)^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 6.90, size = 66, normalized size = 0.67 \begin {gather*} \frac {(a+b x) \left (\frac {2 B \sqrt {x}}{b}-\frac {2 (a B-A b) \tan ^{-1}\left (\frac {\sqrt {b} \sqrt {x}}{\sqrt {a}}\right )}{\sqrt {a} b^{3/2}}\right )}{\sqrt {(a+b x)^2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 102, normalized size = 1.03 \begin {gather*} \left [\frac {2 \, B a b \sqrt {x} + {\left (B a - A b\right )} \sqrt {-a b} \log \left (\frac {b x - a - 2 \, \sqrt {-a b} \sqrt {x}}{b x + a}\right )}{a b^{2}}, \frac {2 \, {\left (B a b \sqrt {x} + {\left (B a - A b\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b}}{b \sqrt {x}}\right )\right )}}{a b^{2}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.16, size = 57, normalized size = 0.58 \begin {gather*} \frac {2 \, B \sqrt {x} \mathrm {sgn}\left (b x + a\right )}{b} - \frac {2 \, {\left (B a \mathrm {sgn}\left (b x + a\right ) - A b \mathrm {sgn}\left (b x + a\right )\right )} \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{\sqrt {a b} b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.06, size = 65, normalized size = 0.66 \begin {gather*} \frac {2 \left (b x +a \right ) \left (A b \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )-B a \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )+\sqrt {a b}\, B \sqrt {x}\right )}{\sqrt {\left (b x +a \right )^{2}}\, \sqrt {a b}\, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 1.54, size = 140, normalized size = 1.41 \begin {gather*} -\frac {2 \, {\left (B a - A b\right )} \arctan \left (\frac {b \sqrt {x}}{\sqrt {a b}}\right )}{\sqrt {a b} b} + \frac {{\left ({\left (3 \, B a b - A b^{2}\right )} x^{2} + 3 \, {\left (B a^{2} + A a b\right )} x\right )} \sqrt {x} + \frac {2 \, {\left (A a b x^{2} + 3 \, A a^{2} x\right )}}{\sqrt {x}}}{3 \, {\left (a^{2} b x + a^{3}\right )}} - \frac {{\left (3 \, B a b - A b^{2}\right )} x^{\frac {3}{2}} - 6 \, {\left (B a^{2} - A a b\right )} \sqrt {x}}{3 \, a^{2} b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {A+B\,x}{\sqrt {x}\,\sqrt {{\left (a+b\,x\right )}^2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A + B x}{\sqrt {x} \sqrt {\left (a + b x\right )^{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________